package com.ocm.tourism.core.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.TableGenerator;
import javax.persistence.Version;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import org.springframework.beans.factory.annotation.Configurable;

@Entity
@Configurable
public class ContentTranslate {

   @Id
   @GeneratedValue(strategy=GenerationType.TABLE,generator="GEN_TRANSLATE")
   @TableGenerator(name = "GEN_TRANSLATE", table = "SEQUENCE_LIST", allocationSize = 1, initialValue = 1, pkColumnName = "NAME", valueColumnName = "NEXT_SEQUENCE", pkColumnValue = "TRANSLATE")
   private Long id;

   @Version
   @Column(name = "version")
   private Integer version;

   @Lob
   @org.hibernate.annotations.Type(type = "org.hibernate.type.TextType")
   private String content;

   @Size(max = 4000)
   private String description;

   @NotNull
   @Size(max = 255)
   private String name;

   private Long foreignKey;

   @Enumerated(EnumType.STRING)
   private LanguageType languageType;

   @Enumerated(EnumType.STRING)
   private TransalationType transalationType;
   
   public Long getId() {
      return this.id;
   }

   public void setId(Long id) {
      this.id = id;
   }

   public Integer getVersion() {
      return this.version;
   }

   public void setVersion(Integer version) {
      this.version = version;
   }

   public String getContent() {
      return content;
   }

   public void setContent(String content) {
      this.content = content;
   }

   public String getDescription() {
      return description;
   }

   public void setDescription(String description) {
      this.description = description;
   }

   public String getName() {
      return name;
   }

   public void setName(String name) {
      this.name = name;
   }

   public Long getForeignKey() {
      return foreignKey;
   }

   public void setForeignKey(Long foreignKey) {
      this.foreignKey = foreignKey;
   }

   public LanguageType getLanguageType() {
      return languageType;
   }

   public void setLanguageType(LanguageType languageType) {
      this.languageType = languageType;
   }

   public TransalationType getTransalationType() {
      return transalationType;
   }

   public void setTransalationType(TransalationType transalationType) {
      this.transalationType = transalationType;
   }
}
